<template>
	<view class="company-info">
		<view class="info">
			<view class="paragraph">{{company.web_company}} 版权所有</view>
			<view class="paragraph" @click="openUrl(company.technical_website)">{{company.technical_support}} 技术支持
			</view>
			<!-- #ifdef H5 -->
			<view class="paragraph" @click="openUrl('https://beian.miit.gov.cn')">{{company.web_record_number}}</view>
			<!-- #endif -->
			<!-- #ifdef MP -->
			<view class="paragraph" @click="openUrl('https://beian.miit.gov.cn')">{{company.mini_record_number}}</view>
			<!-- #endif -->
			<!-- #ifdef APP -->
			<view class="paragraph" @click="openUrl('https://beian.miit.gov.cn')">{{company.app_record_number}}</view>
			<!-- #endif -->
		</view>
	</view>
</template>

<script setup>
	import cache from '@/utils/cache';
	import {
		ref,
		reactive,
		toRefs,
		inject
	} from 'vue';

	const props = defineProps({});

	const state = reactive({
		company: JSON.parse(cache.get('company-info'))
	});

	function openUrl(url) {
		location.href = url;
	}

	const {
		company,
	} = toRefs(state);
</script>

<style lang="scss">
	.company-info {
		@include f-center($direction: column);
		padding: $margin-24;

		.info {
			margin-top: $margin-20;
			opacity: 0.8;

			.paragraph {
				color: $tips-color;
				text-align: center;
			}
		}
	}
</style>